<html>
<head><meta charset="utf-8"><title>No way to ignore output of a test? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20way.20to.20ignore.20output.20of.20a.20test.3F.html">No way to ignore output of a test?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="227270740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20way%20to%20ignore%20output%20of%20a%20test%3F/near/227270740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20way.20to.20ignore.20output.20of.20a.20test.3F.html#227270740">(Feb 22 2021 at 14:07)</a>:</h4>
<p>I know I asked this before.. but is there really no way to ignore output of a test? I want to test that compilation of a program does not cause ICE. I don't really care about the output, but many test directories require a .stdout file to compare the rustc output. I found some directories where rustc stdout is ignored (e.g. <code>test/mir-opt</code>), but it's weird to put an unrelated file there just to ignore the stdout. Any ideas?</p>



<a name="227271199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20way%20to%20ignore%20output%20of%20a%20test%3F/near/227271199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tm <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20way.20to.20ignore.20output.20of.20a.20test.3F.html#227271199">(Feb 22 2021 at 14:10)</a>:</h4>
<p><code>dont-check-compiler-stdout</code> / <code>dont-check-compiler-stderr</code></p>



<a name="227272812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20way%20to%20ignore%20output%20of%20a%20test%3F/near/227272812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20way.20to.20ignore.20output.20of.20a.20test.3F.html#227272812">(Feb 22 2021 at 14:21)</a>:</h4>
<p>Doesn't seem to work. Where do I add that exactly? What is the full syntax?</p>



<a name="227272956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20way%20to%20ignore%20output%20of%20a%20test%3F/near/227272956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20way.20to.20ignore.20output.20of.20a.20test.3F.html#227272956">(Feb 22 2021 at 14:22)</a>:</h4>
<p>I added <code>// dont-check-compiler-stdout</code> at the beginning of the test file. Test file is in <code>src/test/pretty</code></p>



<a name="227273765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20way%20to%20ignore%20output%20of%20a%20test%3F/near/227273765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tm <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20way.20to.20ignore.20output.20of.20a.20test.3F.html#227273765">(Feb 22 2021 at 14:26)</a>:</h4>
<p>That would be for an UI test.</p>



<a name="227274054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20way%20to%20ignore%20output%20of%20a%20test%3F/near/227274054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tm <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20way.20to.20ignore.20output.20of.20a.20test.3F.html#227274054">(Feb 22 2021 at 14:28)</a>:</h4>
<p>For pretty printing tests there is <code>pretty-compare-only</code>, but that might be too late still.</p>



<a name="227274147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20way%20to%20ignore%20output%20of%20a%20test%3F/near/227274147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20way.20to.20ignore.20output.20of.20a.20test.3F.html#227274147">(Feb 22 2021 at 14:29)</a>:</h4>
<p>Should it work for tests in <code>ui/issues</code>? I'm trying there too, doesn't work.</p>



<a name="227274429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20way%20to%20ignore%20output%20of%20a%20test%3F/near/227274429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20way.20to.20ignore.20output.20of.20a.20test.3F.html#227274429">(Feb 22 2021 at 14:30)</a>:</h4>
<p>Doesn't work in <code>ui/</code> either</p>



<a name="227274776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20way%20to%20ignore%20output%20of%20a%20test%3F/near/227274776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20way.20to.20ignore.20output.20of.20a.20test.3F.html#227274776">(Feb 22 2021 at 14:32)</a>:</h4>
<p>Hm, am I even allowed to compare stdouts? I created a stdout file with the expected contents but the test is still failing. It seems like stdout should just be empty?</p>



<a name="227275029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20way%20to%20ignore%20output%20of%20a%20test%3F/near/227275029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20way.20to.20ignore.20output.20of.20a.20test.3F.html#227275029">(Feb 22 2021 at 14:34)</a>:</h4>
<p>Ah, I need <code>check-pass</code>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>